ACTOR " Pig Cop " 31066
{
    //$Category DN3D Aliens //Pig Cops
	Obituary "%o was gunned down by a Pig cop."
    Health 210
    Radius 20
    Height 56
    Mass 310
    Speed 7
    PainChance 128
    SeeSound "Pig/Sight"
    PainSound "Pig/Pain"
    DeathSound "Pig/Death"
    ActiveSound "Pig/Active"
    DropItem " Shotgun " 64 8
    DropItem " Armor " 1
	BloodColor "D1 0C 00" 
	Species "Alien"
	DamageFactor "Damage_Foot", 0.25
	DamageFactor "Damage_Pistol", 1.10
    DamageFactor "Damage_DualPistol", 1.10
	DamageFactor "Damage_BlackTail", 1.16
    DamageFactor "Damage_DualBlackTail", 1.16
	DamageFactor "Damage_DesertEagle", 1.26
    DamageFactor "Damage_Shotgun", 1.08
	DamageFactor "Damage_SuperShotgun", 1.13
	DamageFactor "Damage_ExplosiveShotgun", 1.5
    DamageFactor "Damage_ChaingunCannon", 1.1
	DamageFactor "Damage_Minigun", 1.09
	DamageFactor "Damage_LMGBullet", 1.1
    DamageFactor "Damage_Explosion", 1.98
	DamageFactor "Damage_Shock", 1.52
	DamageFactor "Damage_BigShock", 1.9
	DamageFactor "Damage_Thunder", 1.52
	DamageFactor "Damage_BigThunder", 1.9
	DamageFactor "LaserExplosion", 0.0
    DamageFactor "Damage_Shrinker", 1.0
	DamageFactor "Damage_Expander", 0.82
	DamageFactor "Damage_Laser", 1.43
	DamageFactor "Damage_Railgun", 1.5
    DamageFactor "Ice", 0.82
    DamageFactor "Fire", 0.45
	DamageFactor "Damage_Pulse", 1.45
	DamageFactor "AlienPoison", 0.0
	DamageFactor "Trip_Punch", 0.0
	DamageFactor "Damage_Step", 0.0
	DamageFactor "PigCopBullet", 0.0
	Painchance "Radial", 256
	Painchance "Damage_Foot", 256
	Painchance "Damage_ExplosiveShotgun", 192
	Painchance "Damage_ChaingunCannon", 192
	Painchance "Damage_Minigun", 192
	Painchance "Damage_LMGBullet", 192
    Painchance "Damage_Explosion", 192
	Painchance "Damage_Laser", 224
	Painchance "LaserShot", 256
	Painchance "Fire", 256
	Scale 0.7
    Decal "NewBulletPuff"
	MaxTargetRange 600
    Monster
	+NOTARGET
    States
    {
    Spawn:
        PIGC A 0
        PIGC A 0 Thing_ChangeTID(0,1000)
        PIGC A 2 A_Look
        Loop
    See:
	    PIGC A 0
	    PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_StopSoundEx("SoundSlot7")		
		PIGC AABB 3 A_Chase
		PIGC B 0 A_SpawnItem("AlienStep2",0,0,0,0)
		PIGC CCDD 3 A_Chase
		PIGC D 0 A_SpawnItem("AlienStep2",0,0,0,0)
        Loop		
    Missile:
        PIGC E 0 A_Jump(96,"Missile2")
        PIGC E 14 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
        PIGC G 0 A_Jump(64,1)
        Goto See
		PIGC E 14 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
		PIGC G 0 A_Jump(96,1)
        Goto See
		PIGC E 14 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
		Goto See
    Missile2:
        PIGC HI 8 A_FaceTarget
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC I 16 
		PIGC I 0 A_PlaySound("Shotgun/Pump",6)
        PIGC I 8 		
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC I 16
		PIGC I 8 A_PlaySound("Shotgun/Pump",6)
        PIGC H 8 A_Jump(64,1)
        Goto See
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC I 16 
		PIGC I 0 A_PlaySound("Shotgun/Pump",6)
        PIGC I 8 		
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
		PIGC J 5 Bright A_CustomBulletAttack(Random(8,9),Random(8,9),8,Random(6,7),"PigCopPuff",5000,CBAF_NORANDOM)
        PIGC I 16
		PIGC I 8 A_PlaySound("Shotgun/Pump",6)
        PIGC H 8 
        Goto See
    Pain:
        PIGC Q 0
        PIGC Q 8 A_Pain
        Goto See
	Pain.LaserShot:
	    PIGC Q 0
		PIGC Q 0 A_SpawnItemEx("PainTripLaser",0,0,5)
		PIGC Q 0 HealThing(2)
		Goto See	
	Pain.Radial:
        PIGC Q 0
        PIGC Q 0 HealThing(2)
        Goto See
	Pain.Fire:
	    PIGF A 0
		PIGF A 0 A_GiveInventory("FireCheck",1)
		PIGF A 0 A_GiveInventory("FireCheckDeath",1)
		PIGF A 0 A_PlaySoundEx("FireLoop/Monsters","SoundSlot7",1)
		PIGF A 0 A_PlaySound("Pig/Pain",10)
		PIGF A 0 A_ChangeFlag("NOPAIN",1)
		PIGF A 0 A_ChangeFlag("FRIGHTENED",1)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_JumpIfInventory("FireCheck",8,"PainFireStop")
		Loop	
	PainFireStop:
	    PIGF A 0 
		PIGF A 0 A_ChangeFlag("NOPAIN",0)
		PIGF A 0 A_ChangeFlag("FRIGHTENED",0)
		PIGF A 0 A_TakeInventory("FireCheck",999)
		PIGF A 0 A_TakeInventory("FireCheckDeath",999)
		PIGF A 0 A_StopSoundEx("SoundSlot7")
		Goto See
	Death:	
	    PIGC K 0
		PIGC K 0 A_JumpIfInventory("FireCheckDeath",1,"Burn")
		PIGC K 0 A_ChangeFlag("NOPAIN",0)
		PIGC K 0 A_StopSoundEx("SoundSlot7")
		PIGC K 0 A_Jump(256,1,7)
		PIGC K 7 A_Scream
        PIGC L 7
        PIGC M 7 A_NoBlocking
        PIGC NO 7
        PIGC P -1 
        Stop
		PIG2 K 7 A_Scream
        PIG2 L 7
        PIG2 M 7 A_NoBlocking
        PIG2 NO 7
		PIG2 P 1 A_GiveInventory("Death2Check",1)
		PIG2 P -1  
        Stop
    Death.Damage_Shrinker:
        PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
        PIGC A 10 A_PlaySound("Shrinker/Shrink")
		PIGC A 1 A_SetScale(0.70,0.70)
        PIGC A 1 A_SetScale(0.68,0.68)
        PIGC A 1 A_SetScale(0.66,0.66)
        PIGC A 1 A_SetScale(0.64,0.64)
        PIGC A 1 A_SetScale(0.62,0.62)
        PIGC A 1 A_SetScale(0.60,0.60)
        PIGC A 1 A_SetScale(0.58,0.58)
        PIGC A 1 A_SetScale(0.56,0.56)
        PIGC A 1 A_SetScale(0.54,0.54)
        PIGC A 1 A_SetScale(0.52,0.52)
        PIGC A 1 A_SetScale(0.50,0.50)
        PIGC A 1 A_SetScale(0.48,0.48)
        PIGC A 1 A_SetScale(0.46,0.46)
        PIGC A 1 A_SetScale(0.44,0.44)
        PIGC A 1 A_SetScale(0.42,0.42)
        PIGC A 1 A_SetScale(0.40,0.40)
        PIGC A 1 A_SetScale(0.38,0.38)
        PIGC A 1 A_SetScale(0.36,0.36)
        PIGC A 1 A_SetScale(0.34,0.34)
        PIGC A 1 A_SetScale(0.32,0.32)
        PIGC A 1 A_SetScale(0.30,0.30)
        PIGC A 1 A_SetScale(0.28,0.28)
        PIGC A 1 A_SetScale(0.26,0.26)
        PIGC A 1 A_SetScale(0.24,0.24)
        PIGC A 1 A_SetScale(0.22,0.22)
        PIGC A 1 A_SetScale(0.20,0.20)
		PIGC A 0 A_SpawnItemEx(" Pig Cop Shrunken ",0,0,0,0,0,0,0,32,0)
        Stop
    Death.Damage_Explosion:
	Death.Damage_BigShock:
	Death.Damage_BigThunder:
		PIGC A 0
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
        PIGC A 0 A_PlaySound("Gib/Explode",5)
        PIGC A 0 A_NoBlocking
        PIGC AAA 0 A_SpawnDebris("DukeGibs1")
        PIGC AAA 0 A_SpawnDebris("DukeGibs2")
		PIGC AAA 0 A_SpawnDebris("DukeGibs3")
        PIGC AAA 0 A_SpawnDebris("DukeGibs4")
        PIGC AAA 0 A_SpawnDebris("DukeGibs5")		
        PIGC AAAAAAAAA 0 A_SpawnDebris("DukeGibs6")
	    TNT1 A 1
	    Stop
    Death.Damage_Expander:
        PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 1 A_PlaySound("Expander/Expand",5)
		PIGC A 1 A_SetScale(0.71,0.71)
        PIGC A 1 A_SetScale(0.72,0.72)
		PIGC A 1 A_SetScale(0.73,0.73)
		PIGC A 1 A_SetScale(0.74,0.74)
		PIGC A 1 A_SetScale(0.75,0.75)
		PIGC A 1 A_SetScale(0.76,0.76)
		PIGC A 1 A_SetScale(0.77,0.77)
		PIGC A 1 A_SetScale(0.78,0.78)
		PIGC A 1 A_SetScale(0.79,0.79)
		PIGC A 1 A_SetScale(0.80,0.80)
		PIGC A 1 A_SetScale(0.81,0.81)
		PIGC A 1 A_SetScale(0.82,0.82)
		PIGC A 1 A_SetScale(0.83,0.83)
		PIGC A 1 A_SetScale(0.84,0.84)
		PIGC A 1 A_SetScale(0.85,0.85)
		PIGC A 1 A_SetScale(0.86,0.86)
		PIGC A 1 A_SetScale(0.87,0.87)
		PIGC A 1 A_SetScale(0.88,0.88)
		PIGC A 1 A_SetScale(0.89,0.89)
		PIGC A 1 A_SetScale(0.90,0.90)
		PIGC A 1 A_SetScale(0.91,0.91)
		PIGC A 1 A_SetScale(0.92,0.92)
		PIGC A 1 A_SetScale(0.93,0.93)
		PIGC A 1 A_SetScale(0.94,0.94)
		PIGC A 1 A_SetScale(0.95,0.95)
		PIGC A 1 A_SetScale(0.96,0.96)
		PIGC A 1 A_SetScale(0.97,0.97)
		PIGC A 1 A_SetScale(0.98,0.98)
		PIGC A 1 A_SetScale(0.99,0.99)
		PIGC A 1 A_SetScale(1.00,1.00)
		PIGC A 1 A_SetScale(1.01,1.01)
		PIGC A 1 A_SetScale(1.02,1.02)
		PIGC A 1 A_SetScale(1.03,1.03)
		PIGC A 1 A_SetScale(1.04,1.04)
		PIGC A 1 A_SetScale(1.05,1.05)
		PIGC A 1 A_SetScale(1.06,1.06)
		PIGC A 1 A_SetScale(1.07,1.07)
		PIGC A 1 A_SetScale(1.08,1.08)
		PIGC A 1 A_SetScale(1.09,1.09)
		PIGC A 1 A_SetScale(1.10,1.10)
		PIGC A 1 A_SetScale(1.11,1.11)
		PIGC A 1 A_SetScale(1.12,1.12)
		PIGC A 1 A_SetScale(1.13,1.13)
		PIGC A 1 A_SetScale(1.14,1.14)
        PIGC A 25 A_SetScale(1.15,1.15)
        PIGC A 0 A_SpawnItemEx("ExpanderExplosion",0,0,32,0,0,0,0,SXF_ABSOLUTEVELOCITY,0)
        Goto Death.Damage_Explosion
	Burn:
	    PIGF K 0
		PIGF K 0 A_ChangeFlag("NOPAIN",0)
		PIGF K 0 A_StopSoundEx("SoundSlot7")
		PIGF K 0 A_Jump(256,1,39)
		PIGF K 0 A_Scream
		PIGF KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIGF LLLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PIGF M 0 A_NoBlocking
		PIGF MMMMMMM 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PIGF NNNNNNN 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PIGF OOOOOO 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PIGF O 1 Bright A_SpawnItemEx("FireintheFloor")
        PIGF P -1 
        Stop
		PIF2 K 0 A_Scream
		PIF2 KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIF2 LLLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PIF2 M 0 A_NoBlocking
		PIF2 MMMMMMM 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PIF2 NNNNNNN 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PIF2 OOOOOO 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PIF2 O 1 Bright A_SpawnItemEx("FireintheFloor")
		PIF2 P 1 A_GiveInventory("Death2CheckFire",1)
		PIF2 P -1  
        Stop
	Raise:
	    TNT1 A 0 
	    TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_ChangeFlag("COUNTKILL",0)
		TNT1 A 0 A_ChangeFlag("SOLID",0)
	    PIGC P 0 A_JumpIfInventory("FireCheckDeath",1,"Raise2")
		PIGC P 0 A_JumpIfInventory("Death2Check",1,2)
		PIGC P 35
		Stop
		PIG2 P 0
		PIG2 P 35
		Stop
	Raise2:
		PIGF P 0
		PIGF P 0 A_JumpIfInventory("Death2CheckFire",1,2)
		PIGF P 35
		Stop
		PIF2 P 0
		PIF2 P 35
		Stop
        }
}

ACTOR "Pig Cop Hurt" : " Pig Cop " 31116
{
    Health 80
	Mass 180
    DropItem " Shotgun " 64 8
    DropItem " Armor " 1
	+SLIDESONWALLS
	+LOOKALLAROUND
	States
    {
    Spawn:
        PIGC A 0
        PIGC A 0 Thing_ChangeTID(0,1000)
        PIGC A 2 A_Look
        Loop
    See:
	    PIGC A 0
	    PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_StopSoundEx("SoundSlot7")		
		PIGC AABB 3 A_Chase
		PIGC B 0 A_SpawnItem("AlienStep2",0,0,0,0)
		PIGC CCDD 3 A_Chase
		PIGC D 0 A_SpawnItem("AlienStep2",0,0,0,0)
        Loop		
    Missile:
        PIGC E 0 A_Jump(96,"Missile2")
        PIGC E 10 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
        PIGC G 0 A_Jump(64,1)
        Goto See
		PIGC E 10 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
		PIGC G 0 A_Jump(96,1)
        Goto See
		PIGC E 10 A_FaceTarget
		PIGC E 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC F 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC G 16
		PIGC G 0 A_PlaySound("Shotgun/Pump",6)
		PIGC G 6
		Goto See
    Missile2:
        PIGC HI 8 A_FaceTarget
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC I 16 
		PIGC I 0 A_PlaySound("Shotgun/Pump",6)
        PIGC I 8 		
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC I 16
		PIGC I 8 A_PlaySound("Shotgun/Pump",6)
        PIGC H 8 A_Jump(64,1)
        Goto See
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC I 16 
		PIGC I 0 A_PlaySound("Shotgun/Pump",6)
        PIGC I 8 		
		PIGC I 8 A_FaceTarget		
		PIGC I 0 A_PlayWeaponSound("Pig/Shoot")
        PIGC J 5 Bright A_CustomBulletAttack(Random(7,6),Random(7,6),8,2,"PigCopPuff")
        PIGC I 16
		PIGC I 8 A_PlaySound("Shotgun/Pump",6)
        PIGC H 8 
        Goto See
    Pain:
        PIGC Q 0
        PIGC Q 8 A_Pain
        Goto See
	Pain.LaserShot:
	    PIGC Q 0
		PIGC Q 0 A_SpawnItemEx("PainTripLaser",0,0,5)
		PIGC Q 0 HealThing(2)
		Goto See	
	Pain.Radial:
        PIGC Q 0
        PIGC Q 0 HealThing(2)
        Goto See
	Pain.Fire:
	    PIGF A 0
		PIGF A 0 A_GiveInventory("FireCheck",1)
		PIGF A 0 A_GiveInventory("FireCheckDeath",1)
		PIGF A 0 A_PlaySoundEx("FireLoop/Monsters","SoundSlot7",1)
		PIGF A 0 A_PlaySound("Pig/Pain",10)
		PIGF A 0 A_ChangeFlag("NOPAIN",1)
		PIGF A 0 A_ChangeFlag("FRIGHTENED",1)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF A 0 A_Wander
		PIGF A 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF AAA 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF B 0 A_Wander
		PIGF B 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF BBB 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF C 0 A_Wander
		PIGF C 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF CCC 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_Wander
		PIGF D 0 A_SpawnItemEx("FireRadiusDamage2",0,0,38)
		PIGF DDD 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
		PIGF D 0 A_JumpIfInventory("FireCheck",8,"PainFireStop")
		Loop	
	PainFireStop:
	    PIGF A 0 
		PIGF A 0 A_ChangeFlag("NOPAIN",0)
		PIGF A 0 A_ChangeFlag("FRIGHTENED",0)
		PIGF A 0 A_TakeInventory("FireCheck",999)
		PIGF A 0 A_TakeInventory("FireCheckDeath",999)
		PIGF A 0 A_StopSoundEx("SoundSlot7")
		Goto See
	Death:	
	    PIGC K 0
		PIGC K 0 A_JumpIfInventory("FireCheckDeath",1,"Burn")
		PIGC K 0 A_ChangeFlag("NOPAIN",0)
		PIGC K 0 A_StopSoundEx("SoundSlot7")
		PIGC K 0 A_Jump(256,1,7)
		PIGC K 7 A_Scream
        PIGC L 7
        PIGC M 7 A_NoBlocking
        PIGC NO 7
        PIGC P -1 
        Stop
		PIG2 K 7 A_Scream
        PIG2 L 7
        PIG2 M 7 A_NoBlocking
        PIG2 NO 7
		PIG2 P 1 A_GiveInventory("Death2Check",1)
		PIG2 P -1  
        Stop
    Death.Damage_Shrinker:
        PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
        PIGC A 10 A_PlaySound("Shrinker/Shrink")
		PIGC A 1 A_SetScale(0.70,0.70)
        PIGC A 1 A_SetScale(0.68,0.68)
        PIGC A 1 A_SetScale(0.66,0.66)
        PIGC A 1 A_SetScale(0.64,0.64)
        PIGC A 1 A_SetScale(0.62,0.62)
        PIGC A 1 A_SetScale(0.60,0.60)
        PIGC A 1 A_SetScale(0.58,0.58)
        PIGC A 1 A_SetScale(0.56,0.56)
        PIGC A 1 A_SetScale(0.54,0.54)
        PIGC A 1 A_SetScale(0.52,0.52)
        PIGC A 1 A_SetScale(0.50,0.50)
        PIGC A 1 A_SetScale(0.48,0.48)
        PIGC A 1 A_SetScale(0.46,0.46)
        PIGC A 1 A_SetScale(0.44,0.44)
        PIGC A 1 A_SetScale(0.42,0.42)
        PIGC A 1 A_SetScale(0.40,0.40)
        PIGC A 1 A_SetScale(0.38,0.38)
        PIGC A 1 A_SetScale(0.36,0.36)
        PIGC A 1 A_SetScale(0.34,0.34)
        PIGC A 1 A_SetScale(0.32,0.32)
        PIGC A 1 A_SetScale(0.30,0.30)
        PIGC A 1 A_SetScale(0.28,0.28)
        PIGC A 1 A_SetScale(0.26,0.26)
        PIGC A 1 A_SetScale(0.24,0.24)
        PIGC A 1 A_SetScale(0.22,0.22)
        PIGC A 1 A_SetScale(0.20,0.20)
		PIGC A 0 A_SpawnItemEx(" Pig Cop Shrunken ",0,0,0,0,0,0,0,32,0)
        Stop
    Death.Damage_Explosion:
	Death.Damage_BigShock:
	Death.Damage_BigThunder:
		PIGC A 0
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
        PIGC A 0 A_PlaySound("Gib/Explode",5)
        PIGC A 0 A_NoBlocking
        PIGC AAA 0 A_SpawnDebris("DukeGibs1")
        PIGC AAA 0 A_SpawnDebris("DukeGibs2")
		PIGC AAA 0 A_SpawnDebris("DukeGibs3")
        PIGC AAA 0 A_SpawnDebris("DukeGibs4")
        PIGC AAA 0 A_SpawnDebris("DukeGibs5")		
        PIGC AAAAAAAAA 0 A_SpawnDebris("DukeGibs6")
	    TNT1 A 1
	    Stop
    Death.Damage_Expander:
        PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 1 A_PlaySound("Expander/Expand",5)
		PIGC A 1 A_SetScale(0.71,0.71)
        PIGC A 1 A_SetScale(0.72,0.72)
		PIGC A 1 A_SetScale(0.73,0.73)
		PIGC A 1 A_SetScale(0.74,0.74)
		PIGC A 1 A_SetScale(0.75,0.75)
		PIGC A 1 A_SetScale(0.76,0.76)
		PIGC A 1 A_SetScale(0.77,0.77)
		PIGC A 1 A_SetScale(0.78,0.78)
		PIGC A 1 A_SetScale(0.79,0.79)
		PIGC A 1 A_SetScale(0.80,0.80)
		PIGC A 1 A_SetScale(0.81,0.81)
		PIGC A 1 A_SetScale(0.82,0.82)
		PIGC A 1 A_SetScale(0.83,0.83)
		PIGC A 1 A_SetScale(0.84,0.84)
		PIGC A 1 A_SetScale(0.85,0.85)
		PIGC A 1 A_SetScale(0.86,0.86)
		PIGC A 1 A_SetScale(0.87,0.87)
		PIGC A 1 A_SetScale(0.88,0.88)
		PIGC A 1 A_SetScale(0.89,0.89)
		PIGC A 1 A_SetScale(0.90,0.90)
		PIGC A 1 A_SetScale(0.91,0.91)
		PIGC A 1 A_SetScale(0.92,0.92)
		PIGC A 1 A_SetScale(0.93,0.93)
		PIGC A 1 A_SetScale(0.94,0.94)
		PIGC A 1 A_SetScale(0.95,0.95)
		PIGC A 1 A_SetScale(0.96,0.96)
		PIGC A 1 A_SetScale(0.97,0.97)
		PIGC A 1 A_SetScale(0.98,0.98)
		PIGC A 1 A_SetScale(0.99,0.99)
		PIGC A 1 A_SetScale(1.00,1.00)
		PIGC A 1 A_SetScale(1.01,1.01)
		PIGC A 1 A_SetScale(1.02,1.02)
		PIGC A 1 A_SetScale(1.03,1.03)
		PIGC A 1 A_SetScale(1.04,1.04)
		PIGC A 1 A_SetScale(1.05,1.05)
		PIGC A 1 A_SetScale(1.06,1.06)
		PIGC A 1 A_SetScale(1.07,1.07)
		PIGC A 1 A_SetScale(1.08,1.08)
		PIGC A 1 A_SetScale(1.09,1.09)
		PIGC A 1 A_SetScale(1.10,1.10)
		PIGC A 1 A_SetScale(1.11,1.11)
		PIGC A 1 A_SetScale(1.12,1.12)
		PIGC A 1 A_SetScale(1.13,1.13)
		PIGC A 1 A_SetScale(1.14,1.14)
        PIGC A 25 A_SetScale(1.15,1.15)
        PIGC A 0 A_SpawnItemEx("ExpanderExplosion",0,0,32,0,0,0,0,SXF_ABSOLUTEVELOCITY,0)
        Goto Death.Damage_Explosion
	Burn:
	    PIGF K 0
		PIGF K 0 A_ChangeFlag("NOPAIN",0)
		PIGF K 0 A_StopSoundEx("SoundSlot7")
		PIGF K 0 A_Jump(256,1,39)
		PIGF K 0 A_Scream
		PIGF KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIGF LLLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PIGF M 0 A_NoBlocking
		PIGF MMMMMMM 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PIGF NNNNNNN 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PIGF OOOOOO 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PIGF O 1 Bright A_SpawnItemEx("FireintheFloor")
        PIGF P -1 
        Stop
		PIF2 K 0 A_Scream
		PIF2 KKKKKKK 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,56),0,0,1,0,32)
        PIF2 LLLLLLL 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,42),0,0,1,0,32)
        PIF2 M 0 A_NoBlocking
		PIF2 MMMMMMM 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
		PIF2 NNNNNNN 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,30),0,0,1,0,32)
        PIF2 OOOOOO 1 Bright A_SpawnItemEx("FirePuffDuke",Random(-16,16),Random(-16,16),Random(5,18),0,0,1,0,32)
		PIF2 O 1 Bright A_SpawnItemEx("FireintheFloor")
		PIF2 P 1 A_GiveInventory("Death2CheckFire",1)
		PIF2 P -1  
        Stop
	Raise:
	    TNT1 A 0 
	    TNT1 A 0 A_UnSetShootable
		TNT1 A 0 A_ChangeFlag("COUNTKILL",0)
		TNT1 A 0 A_ChangeFlag("SOLID",0)
	    PIGC P 0 A_JumpIfInventory("FireCheckDeath",1,"Raise2")
		PIGC P 0 A_JumpIfInventory("Death2Check",1,2)
		PIGC P 35
		Stop
		PIG2 P 0
		PIG2 P 35
		Stop
	Raise2:
		PIGF P 0
		PIGF P 0 A_JumpIfInventory("Death2CheckFire",1,2)
		PIGF P 35
		Stop
		PIF2 P 0
		PIF2 P 35
		Stop
        }
}

ACTOR FireRadiusDamage2
{
     Speed 0
     Radius 1
     Height 1
     DamageType "Fire"
     Damage 0
     +RIPPER
     +NOGRAVITY
     +THRUGHOST
     +FORCERADIUSDMG
	 +BLOODLESSIMPACT
     States
     {
     Spawn:
          TNT1 A 0
          Goto Death
     Death:
          TNT1 A 1 A_Explode(6,2)
          Stop
          }
}

ACTOR PigCopPuff : DukeBulletPuff
{
    DamageType "PigCopBullet"
}

ACTOR " Pig Cop Shrunken " 
{
    Health 30
    Radius 20
    Height 16
    Mass 0x7FFFFFFF
    Speed 3
    PainChance 128
    SeeSound "Pig/Sight"
    PainSound "Pig/Pain"
    DeathSound "Pig/Death"
    ActiveSound "Pig/Active"
	BloodColor "D1 0C 00" 
	Species "Alien"
    Scale 0.20
	DamageFactor "Damage_Foot", 5.0
	DamageFactor "LaserExplosion", 0.0
    DamageFactor "Damage_Shrinker", 0.0
	DamageFactor "Trip_Punch", 0.0
	Painchance "LaserShot", 256
	+ISMONSTER
	+SHOOTABLE
    +SOLID
	+NOTARGET
	+FRIGHTENED
    States
    {
    Spawn:
        PIGC A 0 
		PIGC A 0 A_JumpIfInventory("ShrunkenCheck",40,"Restore")
		PIGC A 0 A_GiveInventory("ShrunkenCheck",1)
        PIGC AAAAAAAA 3 A_Look
        Loop
    See:
	    PIGC A 0 
	    PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 0 A_JumpIfInventory("ShrunkenCheck",40,"Restore")
		PIGC A 0 A_GiveInventory("ShrunkenCheck",1)
		PIGC AABB 3 A_Chase
		PIGC B 0 A_SpawnItem("AlienStep2",0,0,0,0)
		PIGC CCDD 3 A_Chase
		PIGC D 0 A_SpawnItem("AlienStep2",0,0,0,0)
        Loop
    Pain:
		PIGC Q 8 A_Pain
        Goto See 
	Pain.LaserShot:
	    PIGC Q 0 
		PIGC Q 0 A_SpawnItemEx("PainTripLaser",0,0,8)
		PIGC Q 0 HealThing(2)
		Goto See
	Pain.Radial:
        PIGC Q 0
        PIGC Q 0 HealThing(2)
        Goto See
	Restore:
	    PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
        PIGC A 10 A_PlaySound("Shrinker/Shrink")
		PIGC A 1 A_SetScale(0.20,0.20)
        PIGC A 1 A_SetScale(0.22,0.22)
        PIGC A 1 A_SetScale(0.26,0.24)
        PIGC A 1 A_SetScale(0.24,0.24)
        PIGC A 1 A_SetScale(0.28,0.28)
        PIGC A 1 A_SetScale(0.30,0.30)
        PIGC A 1 A_SetScale(0.32,0.32)
        PIGC A 1 A_SetScale(0.34,0.34)
        PIGC A 1 A_SetScale(0.36,0.36)
        PIGC A 1 A_SetScale(0.38,0.38)
        PIGC A 1 A_SetScale(0.40,0.40)
        PIGC A 1 A_SetScale(0.42,0.42)
        PIGC A 1 A_SetScale(0.44,0.44)
        PIGC A 1 A_SetScale(0.46,0.46)
        PIGC A 1 A_SetScale(0.48,0.48)
        PIGC A 1 A_SetScale(0.50,0.50)
        PIGC A 1 A_SetScale(0.52,0.52)
        PIGC A 1 A_SetScale(0.54,0.54)
        PIGC A 1 A_SetScale(0.56,0.56)
        PIGC A 1 A_SetScale(0.58,0.58)
        PIGC A 1 A_SetScale(0.60,0.60)
        PIGC A 1 A_SetScale(0.62,0.62)
        PIGC A 1 A_SetScale(0.64,0.64)
        PIGC A 1 A_SetScale(0.66,0.66)
        PIGC A 1 A_SetScale(0.68,0.68)
        PIGC A 1 A_SetScale(0.70,0.70)
		PIGC A 0 A_SpawnItemEx(" Pig Cop ",0,0,0,0,0,0,0,32,0)
        Stop
	Death:
	    PIGC A 0
		PIGC A 0 A_StopSoundEx("Body")
		PIGC A 0 A_StopSoundEx("SoundSlot7")
		PIGC A 0 A_ChangeFlag("NOPAIN",0)
		PIGC A 0 A_Stop
        PIGC A 0 A_PlaySound("DukeNukem/DeathLittle",5)
        PIGC A 0 A_NoBlocking
        PIGC A 0 A_SpawnDebris("DukeGibs1")
        PIGC A 0 A_SpawnDebris("DukeGibs2")
		PIGC A 0 A_SpawnDebris("DukeGibs3")
        PIGC A 0 A_SpawnDebris("DukeGibs4")
        PIGC A 0 A_SpawnDebris("DukeGibs5")		
        PIGC AAAAA 0 A_SpawnDebris("DukeGibs6")
	    TNT1 A 1
	    Stop
    }
}

ACTOR AlienStep2
{
    +NOINTERACTION
    +CLIENTSIDEONLY
    States
    {
    Spawn:
	    TNT1 A 0
	    TNT1 A 0 A_PlaySound("Foot/AlienStep2")
	    Stop
	    }
}